//计算球体重量
#include <stdio.h>
#include <math.h>
int main(void)
{
    int r_Fe,r_Au;
    double weight_Fe,weight_Au;
    
    scanf("%d %d",&r_Fe,&r_Au);
    do{
        
        if(r_Fe <0 || r_Fe >100){
            printf("直径必须在0到100之间,请重新输入!\n");

        }
    }while(r_Fe <0||r_Fe >100);

    do{
        if(r_Au <0 || r_Au >100){
            printf("直径必须在0到100之间,请重新输入!\n");

        }
    }while(r_Au <0||r_Au >100);
    const double PI = 3.1415926;

    weight_Fe = 4/3.0 *PI* pow(r_Fe,3)*7.86/8000;
    weight_Au = 4/3.0 *PI* pow(r_Au,3)*19.3/8000;

    printf("%.3f  %.3f",weight_Fe,weight_Au);

    return 0;
}